package com.whh.dao.user;

import com.whh.pojo.Role;
import com.whh.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //登录
    public User login(Connection connection, String userCode);
    //通过userCode获取User
     public User getLoginUser(Connection connection, String userCode);
    //修改密码
    public int updatePwd(Connection connection,int id,String password) throws SQLException;
    //添加用户
    public int add(Connection connection,User user) throws SQLException;
    //删除用户
    public int deleteUserById(Connection connection,Integer delId) throws SQLException;
    //修改用户
    public int modify(Connection connection,User user) throws SQLException;
    //根据用户名或者角色查询用户总数
    public int getUserCount(Connection connection,String username,int userRole) throws SQLException;
    //查询用户列表
    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo, int pageSize) throws SQLException;
    //通过id查询指定用户信息
    public User getUserById(Connection connection,String id);
}































